import { createRouter, createWebHistory } from 'vue-router';
import Home from '../views/Home.vue';
import StoreManagement from '../views/StoreManagement.vue';
import TutorManagement from '../views/TutorManagement.vue'; // 助教管理页面
import UserManagement from '../views/UserManagement.vue'; //用户管理页面
import EmployeeManagement from '../views/EmployeeManagement.vue';//内部员工
import HomePage from '../views/HomePage.vue';
import ActivityManagement from '../views/ActivityManagement.vue';
import CouponManagement from '../views/CouponManagement.vue';
import AboutBallManagement from '../views/AboutBallManagement.vue';
import RechargeCardManagement from '../views/RechargeCardManagement.vue';
import OrderManagement from '../views/OrderManagement.vue';

const routes = [
    {
        path: '/',
        name: 'Login',
        component: () => import('../views/Login.vue'), // 登录页面
    },
    {
        path: '/home',
        name: 'Home',
        component: Home, // 主页面
        children: [
            {
                path: 'store-management',
                name: 'StoreManagement',
                component: StoreManagement, // 门店管理页面
            },
            {
                path: 'tutor-management',
                name: 'TutorManagement',
                component: TutorManagement, // 助教管理页面
            },
            {
                path: 'user-management',
                name: 'UserManagement',
                component: UserManagement,
            },
            {
                path: 'employee-management',
                name: 'EmployeeManagement',
                component: EmployeeManagement,
            },
            {
                path: 'home-page',
                name: 'HomePage',
                component: HomePage,
            },
            {
                path: 'activity-management',
                name: 'ActivityManagement',
                component: ActivityManagement,
            },
            {
                path: 'coupon-management',
                name: 'CouponManagement',
                component: CouponManagement,
            },
            {
                path: 'about-ball-management',
                name: 'About-Ball-Management',
                component: AboutBallManagement,
            },
            {
                path: 'recharge-card-management',
                name: 'RechargeCardManagement',
                component: RechargeCardManagement,
            },
            {
                path: 'order-management',
                name: 'OrderManagement',
                component: OrderManagement,
            },
        ]
    },
    // 其他路由
];

const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes,
});

export default router;
